<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <style>
            /*rem是以根元素的font-size为单位确定的*/
            html,body{
                font-size: 10px;/*此时div的height:200px,width:300px*/
            }
            .con{
                height: 20rem;
                width: 30rem;
                background-color: rosybrown;
            }
        </style>
    </head>
    <body>
        <div class="con"></div>
    </body>
</html>